Fix encoding in exchange of decryption keys with agent

Base64-encode encryption keys before sending them to the agent.
Previously the decryption keys were mangled in-transmission if
the key contained bytes that were not legal UTF-8
Add --debug option to CLI

If enabled, this prints a stacktrace in the event of
a command failing.