(#21091) pass --fail to curl

This causes curl to treat things like 404's as errors, causing a
fallback to open-uri and, eventually, a sensible error message.

This should fix the reported failure.  As a backstop, it might also make sense to check whether the downloaded file exists, and fail if not.  That seems like overkill to me, but I'll implement it if desired.