Changes to support processing a directory of files

Added support for processing a directory of files or a single file.