flatten directory structure