Added option for output directory.