Fix "'WindowsError' is not defined" error on OSX when deleting a file.