Fix documentation of when dirName() allocates

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