win: Fix a buffer overflow.
Create temp file under the temp directory.

On Windows the file is watched by watching its parent, so it's possible
that we do not have access to watch the '/tmp' directory.