curl should also fail on unsuccessful downloads

Currently returns 0 on 404 by default, causing a mismatch between the download check of wget and curl.