modified to retrieve loose objects through abbreviated SHA1
exception handling in cat-file and ls-tree