Improve `nodes._check_initialpaths_for_relpath` performance (#13448) (#13451)
Use `Path` facilities to greatly improve performance of `nodes._check_initialpaths_for_relpath` (see #13448 for performance comparison).
Related: #13420, #13413.
---------
(cherry picked from commit bd6877e5874b50ee57d0f63b342a67298ee9a1c3)
Co-authored-by: Sashko <20253875+sashko1988@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>