(PUP-3889) Fix checksums writing files
When checking whether the local file must be modified, ensure the metadata
includes the requested checksum, rather than defaulting to md5.
Streaming checksums are compared to file checksums, so they must behave
the same way on a stream that is being written to a file.