refactor: KeyboardInterrupt handling in cli.main.

Related: RhBug:977661

This doesn't fix the bug though as it's real cause lies in 977803.