MESOS-1857 Fixed path::join() on older libstdc++ which lack back().

Review: https://reviews.apache.org/r/26256