Added handling for SIGTERM as well as SIGINT

A quick change to resolve (if I understand correctly) #54; just pulled out the handler and registered it on SIGTERM as well as SIGINT.