Higher order directional derivatives for nonsmooth functions