Fix copying to copy whole directories when symlinks are not supported (e.g. node_modules directory)
Avoid writing versions.json files when we shouldn't (path.sep issue)