Apply results of running 'python-modernize'.

As well as additional fixups on the way toward "stradding" Python2 / Py3k.
I don't know -- it might have inferred that the value must be `str` because of the use of a native string literal in `split()`.  Should be safe to use `six.string_types` (as well as dropping the literal, making it work unambigously for both `unicode` and `str` on Python2).