Sourced from Chef::Util::PathHelper. Should be removed when Chef 11 catches up or we stop supporting Chef 11
Chef