Merge pull request #97 from pre-commit/dont_write_files_that_arent_cleaned_up

Write to temp directories in such a way that files get cleaned up