Handle all keyboard interrupts more completely

This fixes #27.