Remove print statements from test.
Moved catching of KeyboardInterrupt and SystemExit.