set permissions after git clone, fix #3117

This fixes 'npm cache clear' issues on Windows 7 that are due to git clone writing files marked as read only. You can reproduce this by using git: urls that get cloned in the cache folder.