Fix ugly branching in directory trees