Update listFiles to return array of objects, added unit test for listFiles