Added support for processing whole directories