Merge File basename and direname into split

Faster because only does one split in that case.
Merge pull request #8158 from cirosantilli/basename-dirname-split

Merge File basename and direname into split