Use location option in curl to follow redirects