Fix #10 -- clean up temp on failure
Merge pull request #11 from alex/patch-1

Fix #10 -- clean up temp on failure