Use tmpdir instead of /tmp for windows compatability
Merge pull request #160 from hunner/use_tmpfile

Use tmpdir instead of /tmp for windows compatability