Fix ignored tests.

* Fix and augment TestCommand tests.
* Fix NewCommand tests.
* Fix InitCommand ignored test.
* Fix CLI tests.

Fixes #996.