Return first path matching pattern, not dir.