Raise traceback on error when using CLI and -debug

When --debug is specified to the CLI don't just print the simple error
message but actually reraise that error.

Change-Id: I616eda8e033342cff7f3412e3a414a7530ef3848
Closes-Bug: #1268202
Merge "Raise traceback on error when using CLI and -debug"