Rev-parse: stop referencing freed memory. Converted an internal utility to return an oid, rather than a tree entry (whose lifetime is tied to the parent tree, which was freed before returning).