Refactor io.ascii to use six

Continue with #1219 for `io.ascii`.  This will probably start from #1949, and if all goes well, supercede it.