Changed chmod call for windows compatibility