added ability to run script from commandline and iterate through one or many subdirectories