Reduce chances for temp files cleanup failure on Win32

Closed Bitbucket Importer requested to merge bitbucket/declined-pr-45 into branch/2.1