Bugfixes and enhancements for Interactive mode

Here are a couple of things I ran into when trying to use a persistent, interactive shell (as opposed to just calling SU.run("foo") for each command)

I'm not sure that everything is 100% perfect yet, but I was hoping you could look over the diffs and let me know if I'm on the right track?

Thanks.