Fix #31368: joinpath works on collections of paths (#38263)
* Fix #31368: joinpath works on collections of paths
* Update base/path.jl
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
* Apply suggestions from code review
* Fixup
Co-authored-by: Mustafa M <mus-m@outlook.com>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>