Allow output directory to be specified with command line flag