Fix REPL handling of blank lines and errors.