Fix up the types in write_sha1_file