Ooh. This isn't 1995 anymore. Feel free to use array indexed string lookups. (e.g. `trailingSlash = path[path.length - 1] === '/'`)

Though, honestly, I'd have to generate the IR to see if Crankshaft would make any real difference. Either way. :)