Fixes issues with deleting files and cleanup on windows.

On all these `if`s: space before `(`