Adding 'basename' function

Needed a basename function to pull directory names off the end of a fully-qualified path. This didn't exist so I made it. It's essentially a copy of dirname's function and spec files. Tested on CentOS 6 (Ruby 1.8.7) & 7 (Ruby 2.0.0).