Handle UTF-8 keys in jsonrpc.py

JsonWrapDict will blow up (in python 2) if handed a utf8 dict key. This patch fixes that.