TermRecord: more proper decoding and encoding of strings

+ This should fix #7
+ We first try to decode using stdout's encoding, then encode escaped
+ JavaScript eval's the resulting escaped output which should result in a JS string

+ Also added a binary example as a test case exercising what was encountered in #7