Adds chmod to ensure write permission.