Capture stdout

Added code to capture stdout during evaluation, so print output is captured in addition to REPL output.