Merge pull request #3250 from cgohlke/patch-2

Fix WindowsError: [Error 32] The process cannot access the file