def write_sha1(file,sha1)
      shafile = "#{file}.sha1"
      File.open(shafile, 'w') { |f| f.write(sha1)  }
    end
def write_sha1(file,sha1)
      shafile = "#{file}.sha1"
      File.open(shafile, 'w') { |f| f.write(sha1)  }
    end
writes the sha1 a file if and only if the contents of the file do not match