Added a command-line option -o or --output to specify the output directory.