Implement directory listing
Sort the result of dir list, handle path correctly

If a dir is requested but the path is not ended with '/', then a 301
is sent to client with '/' appended to the URL.