some cleanups and tweaks from actually using the CLI

Just getting the user IO working correctly.  Fixing a couple of
bugs related to running cmds via the CLI (which isn't tested right
now).

@jcredding sorry had to redo this b/c the prev one was not pointed at master.