Add basic signal handling for quitting gracefully.