Fix encoding error in Git download scripts
Fix encoding error in Git download scripts

The encoding of the file can be utf-8, latin-1, or ascii (and probably
others), so we now try all of these and take the first successful one.
All text is then encoded to utf-8 so that we have a common standard in
the output files. If none of them succeed, we fail out so as not to push
this problem into reading the JSON files.

tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes