Add a rudimentary CLI.

Add a new class with some CLI-related functionality. Also move
hexadecimal encoding methods into their own module and flesh out some
more sophisticated encoding/decoding.