Handle keyboard interrupt gracefully

Previously, a keyboard interrupt would result in a corrupted terminal. This would manifest when doing "cdiff --log" on somewhat large repositories.