Correctly handle ctrl-c (closes #7)