Fix documentation of when dirName() allocates

Whether the `path` argument is mutable has no bearing on if dirName() allocates.