path_test: Fix test sorting
Sponsored by: The FreeBSD Foundation
(cherry picked from commit c4c66153243896f9de49474c817fe450584a3bf3)