replace make_closing with contextlib
more Py3 fixes

Some Py3 tests pass now; many choke on str/unicode differences.