Fixes issues with deleting files and cleanup on windows.