Address issue in which slashes weren't being appropriately trimmed for p...

Addresses https://github.com/yui/yui3/issues/1964

@caridy @ericf @juandopazo 

I think `Array.prototype.lastIndexOf` is supported in all browsers except IE8 and below, how is that this solves the problem? the two implementations seems equivalent, unless we use two-bytes characters for those urls, which is not the case.  As @ericf mentioned, chatAt() should help.