Get a pointer to one of the entries in the index
The values of this entry can be modified (except the path) and the changes will be written back to disk on the next write() call.
The entry should not be freed by the caller.
path to search
stage to search
a pointer to the entry; NULL if it was not found