[server] Don't get_repo before deleting a repo.
[server] Sort dirent list before returning.

Directories before files; names are stored.