Implementation change in search_name.

The file traversal in search_name is now implemented with
a num_entries iteration.