Node util to flatten a directory hierarchy.