Flattens directory substructure references