Fix removing temporary file. Fixes #160.

Thanks to this, my server's `/tmp` got filled in with unused temporary files.

Fix is according to #160 which seems to work.