lib/download.c: use tempfile while decoding new file from binary diff.

this prevents corrupted files when filename == basefile.