fixed bug on Windows with temp files not deleting