rework directory/path processing