Added the option to specify an output dir for the processed files.