Added support for windows paths.

Used os.tmpdir instead of "/tmp/" to support windows. Also used path.join to combine the temp dir with the filename to make doubly sure it will work on both *nix and windows.