More fixes and updated with latest upstream code

I had to move the JSON_DUMPS_ARGS to a separate package so it could be installed correctly (really liked that idea, creating a commong arguments variable). I also fixed some logging, an encoding problem and a typo in the JSON_DUMPS_ARGS variable

Note: I accidentally created this same pull request with a different account, which i closed right away. You can just ignore that one.