Fix PermissionError arising when cloning.