PY3: use six.iterkeys, six.iteritems, and tempfile

This one is less trivial.

I was looking to change Headers.iteritems too, but that one seems different in behavior, so I left alone everything related to that.
i guess it could be `field_iter = item` as well, but with iterkeys the intention is more clear - let's keep it