Added specification for an output directory as well as the input directory.