Fix --cache-file=TMP on Windows

tmpfile() is pretty broken on Windows. It tries to create the file in the root directory, so it almost always fails due to lack of permissions on Vista and up. It will also try to create the cache on a network drive when that's the current drive. I always get ``[file-cache] can't open cache file 'TMP'``.