kern___realpathat(): honor uio_seg argument
(cherry picked from commit bde575b273eeb17abe878e43dd018e8373741298)