List any directory recursively and output it to a file.