Added basic logging and tests for the CLI.
`catch` now prints uncaught errors' traceback directly.
Added CWD to command logging.