Fix saveURLToDep to properly write files to disk.