20130920: perl script to generate file tree, currently not working and needs some debugging