Add test for CLI input validation

Add a simple test for checking that errors are raised on extraneuous
arguments to the CLI unless there is a rest command defined.

Part of #276.
Add CLI input validation for extraneous arguments

If extraneous arguments are sent to the command parser an exception is
now raised. I hope this doesn't break anything else. The unittest is so
far from complete when it comes to command parsing that it won't help.
I've done some manual testing which didn't show anything else being
broken.

Fixes #276.
Merge branch '276-cli-input-validation'