Fix escape_item() for py3k.