Optimize edge-case check in basename
Optimize edge-case check in basename

Before: Performance change for basename is -97.7%
 After: Performance change for basename is -34.5%

Refs #130

danielpclark/faster_path,danielpclark/faster_path,danielpclark/faster_path