Exits the process when the REPL terminates.

Fixes #16.