bpo-33522: Enable CI builds on Visual Studio Team Services (GH-6865) (GH-6926)

(cherry picked from commit e5f41d2f1e0b8b8e61d5fa427c19bd1ea90fd9a3)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index e5b7a92..2143224 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -169,7 +169,9 @@
 
     # Failing that, try OS-specific locations.
     if _os.name == 'nt':
-        dirlist.extend([ r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ])
+        dirlist.extend([ _os.path.expanduser(r'~\AppData\Local\Temp'),
+                         _os.path.expandvars(r'%SYSTEMROOT%\Temp'),
+                         r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ])
     else:
         dirlist.extend([ '/tmp', '/var/tmp', '/usr/tmp' ])