ob-ruby: clean up the session code some more and work around an I/O sync problem...