Curl command logging and unicode fix 

I had commited these some time ago but kept postponing merging them:

- New `log_curl` parameter for pushing the curl commands to the standard python logging module.
-  Fixed `dump_curl/log_curl` to be unicode-aware; curl commands are now encoded to utf-8.