fixed IP defaults formaya
removed sleep command - already fixed by sending a parameter list rather than individual open commands
changed shell commands to use os.chmod