Flattening directory structure