write to $*TMPDIR instead of (maybe readonly) cwd
Merge pull request #22 from FROGGS/patch-1

write to $*TMPDIR instead of (maybe readonly) cwd