fix typo in cli.py
rename rtcodes to exitcodes
write exit codes in exceptions