-O option for output dir - partial fix for #1