Fix trailing slashes in directory listing