Handle encoding correctly when piping

Python doesn't let us know the terminal encoding if we're piping (which
may or may not be correct, depending on who you ask). So we need some
extra handling.

Incidentally, handling the output differently also makes is easier to
test that we're getting the right output.

I've only implemented this for show_stories thus far.