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.