Fix encoding errors

Includes #233, which fixes SocketClient (`fig run`), plus fixes for LogPrinter (`fig up`) and stream_output (`fig build`).

Closes #212 and #231.