Add a generic `process` funtion that calls to process{file,dir}

The client allows passing in multiple paths, so it makes sense that you
can pass in paths to directories and/or files directly.

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>