OC-9390 Handle exit of knife plugin, with correct exit status and from common place in code

Please review and accept changes for exit codes.
Thanks