Handle % character properly

For *printf kind of functions through which the string seems to go
somewhere in the depths of json-c '%' needs to be esacped to %%.