Fix documentation of when dirName() allocates

Whether the `path` argument is mutable or not has no bearing on if dirName() allocates.
Merge pull request #2347 from eco/patch-14

Fix documentation of when dirName() allocates