main: Ensure that exit_status_code always is assigned

KeyboardInterrupts are not always catched in commands.py. As far as I
have seen, if I/O operations are ongoing, a KeyboardInterrupt may be
raised there instead of in commands.py. In some cases, this may cause
loop.run() to return, which previously resulted in exit_status_code
being referenced before assignment.