[BUGFIX] Fix permission of temporary files when importing resources
When importing a site on ``Microsoft Windows 7/8`` an exception can be
thrown due to insufficient file permissions.
This change makes sure that the file permissions are fixed before a
temporary resource file is moved to its final location.
Releases: master, 3.0