Fixed chmod on executable plus removed -w switch.