Added range version of std.path.buildPath()

This also fixes issue #10347.