BLD: ipython_directive, handle non-ascii execution results

@jorisvandenbossche I think this is a clean solution to the non-utf8
output problem we discussed, specifically the example in io.rst. 
This PR should produce the right output on windows and be more amenable
to py3 compat work too. If you confirm that it's good I feel this is clean enough
to try and get upstream, completing the upstreaming effort.

related #5530, https://github.com/pydata/pandas/pull/5925#issuecomment-32407859