This function traverses the tree, matching paths in order of priority, provided they path the matches function: 1: exact matches are given priority to wild cards node at a time This means /"foo"/wild has priority over /wild/"bar" for the route "/foo/bar"