Added chmod for windows tests

Added tests for chmod on windows and tested
on a real windows machine.