Change outfile parameter to outdir for better bulk operation support
in the future.