Better handling of Exceptions when running at CLI

Just return exception text, not HTML when we're at the CLI