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

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

Then yes, go with `charAt`. It's the safe equivalent of array-like access and broadly supported. :smile: