Add --output-dir command line option.

This commit adds the --output-dir option, which takes a single argument
that is interpretted as the directory to place the exported data in.

If the specified directory doesn't exist, a warning message is printed
and the program exits.

Issue #4