CLI: exit with error if the last command failed

Fixes MN-256

Signed-off-by: Guillermo Ontanon <guillermo@midokura.jp>
Merge pull request #48 from gontanon/return-code

CLI: exit with error if the last command failed