Allow output directory to be specified