Fix last commit: add chmod() to fix some permissions derping