Now parses and sorts directory entries.