check the status code of downloads from downloadFileWithURL:progress: and send the appropriate error
previously it was assumed that if URLSession:downloadTask:didFinishDownloadingToURL: was called, the download completed successfully, which is not true. if the status code is not 200 <= code <= 299, an error is sent.