only traverse directories which are valid identifiers