Fixes for #8417

This fixes some issues caused by #8417 which cause problems with windows minions. It restricts the ownership/permissions enforcement added in that pull request to non-windows minions only, applies the same fix to file.copy, and fixes a traceback in ``utils/__init__.py`` on windows minions, which was caused by importing posix.