Fix remote-directory with a url and md5

Remote-directory with a url and md5 was failing due to the filename of the
intermediate directory not matching the original download filename.