Folder and perms bug fixes