Replace optparse with argparse.
Install testing infrastructure.

* Install test coverage report.
* Add initial tests for CLI.