CURL 302/Followlocation workaround

Webservers where a basedir restriction is set and/or safe mode is active don't allow the CURLOPT_FOLLOWLOCATION = true option. This is a workaround for these webservers.

Based on: http://php.net/manual/en/function.curl-setopt.php#102121