Tweak option parsing to facilitate unit testing
Initial unit tests (nose)