Fix perms/path bugs