a new version that reads in an input file -- this has more flexibility,
as it can use multiple root directories, each with their own list
of subdirectories and files.