use TextIOWrapper when communicating with pandoc subprocess
use TextIOWrapper when communicating with pandoc subprocess

uses 'universal-newline' mode, to avoid confusion with CRLF.

closes #4122
ipython/ipython,ipython/ipython