Autodetect open_basedir and safe_mode to suppress CURLOPT_FOLLOWLOCATION warnings

This feature needs more work but for simple CouchDB installations without redirect is IMHO ok. Smarter workaround would be to use own curl_exec function as described here: http://slopjong.de/2012/03/31/curl-follow-locations-with-safe_mode-enabled-or-open_basedir-set/