Fix/improve path.extname, and path.basename, and path._splitPath
 * Make path.basename behave like unix basename, where basename('some/dir/') == 'dir'
 * Add test cases for path.extname