Fixes #2972  Don't chmod on Windows 

Fixes #2972