Sigterm fix (#137)

This simply adds a SIGTERM handler when the command line program is created. It calls `sys.exit(0)` which will `raise SystemExit` and cause the `atexit` handler to run as it should.