Flatten directory tree