overloaded LooseObject.read
added test for multiple layers of wrapping
implemented FileMode