fix /git/trees/ GitHub compatibility problems

fix octal file mode output formatting
sort tree entries
confirm that /git/blobs/ reference output matches GitHub
confirmed that /refs/tags/:tag_name reference output matches GitHub output
test /git/refs against GitHub output