Update to new CloudFlare API

The CloudFlare API is likely changed from last time, when I tried now to use it to purge some pages automatically it failed and the two fixes made it work for me.