More logical directory name parsing.