fix memory leak: wasn't freeing the list of dir entries that the found file came from