Updating pathname to use a leading '/' for IE compatibility

Redoing #2 with `charAt`