py3: only pass unicode to json.dumps in writediffproperties

Authored by Kwan.