Simplify path_entry's closure argument

Make the closure take two arguments instead of a single `path_entry`
struct; remove the `path_entry` type. This eliminates a bad copy.