added output directory command line

I tested it and it seems to work - can run from directory other than the one containing cmviewer/