Another test that might be helpful, just to completely verify that the file:// scheme works, would be to open the destination file, read its contents, and verify that they are equal to the contents of the file:// URL that was supposed to have been downloaded.