Added support to process entire directories, not just individual files