index: return FileInfo and ImageInfo as values, not pointers.

Change-Id: I6aba3a74ce233cc834550b561f597e549fb2bfab