Fixed os.chmod args and added sys to import