Extend basename to fully wrap node function

When invoked with two args, files/basename will now return filename sans extension if extension matches the second arg.
Merge pull request #1161 from ndr-qef/basename-ext

Extend basename with optional argument for extension matching