flattens dir structure