sort directories and skip special symbols for path autocomplete