handle EOF in REPL

check it out! now the repl can handle EOF (CTRL-D) :smile: