Update buildenv.sh

Added follow redirects for curl.