Fix for sed "permission denied" error in Windows build

Cygwin sed in-place edit (option -i) broken, will mess up permissions.
Changed to work without in-place edit.