modified directory options, covered by test

This modifies the command line options to specify image directory and logging directory. A basic unit test is included. Getting the test working was most of the work - hopefully it can be reused for more tests.