This commit adds support for recording console output as well as exporting it to either text or HTML. A user can also provide their own encoder if they wish.