Returns the last portion of a path. Trailing directory separators are ignored.
path
1.0.0
An optional file extension to be removed from the returned path.