CLI: exit with error if the last command failed

Fixes MN-256

Signed-off-by: Guillermo Ontanon <guillermo@midokura.jp>