Some hacks to unbust the REPL.

Need to revisit both of these, and IO in general, but this gives a
much better user experience than SEGV...