ensureSlash: Fix accidental string-to-NaN coercion (#4424)
ensureSlash: Fix accidental string-to-NaN coercion (#4424)

Summary:
The `hasSlash` method uses `path.substr(path, path.length - 1)` to
remove the last character from `path`. Clearly, the first parameter is
suspect; it should be `0`. The code works as written, but only very
accidentally: the first parameter is coerced by `ToNumber` to `NaN`,
which is then coerced by `ToInteger` to `+0`, per [the spec][1].

[1]: https://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.substr

Test Plan:
Reading the spec should be sufficient. To verify in the Real World:
```js
const path = "has-slash-but-does-not-need-slash/"
const a = path.substr(path, path.length - 1);
const b = path.substr(0, path.length - 1);
console.log(a === b);  // true
console.log(a);        // has-slash-but-does-not-need-slash
```

wchargin-branch: ensureslash-accidental-coercion
mangomint/create-react-app,timlogemann/create-react-app,Timer/create-react-app,Timer/create-react-app,viankakrisna/create-react-app,IamJoseph/create-react-app,infernojs/create-inferno-app,timlogemann/create-react-app,GreenGremlin/create-react-app,facebookincubator/create-react-app,jdcrensh/create-react-app,jdcrensh/create-react-app,jdcrensh/create-react-app,GreenGremlin/create-react-app,infernojs/create-inferno-app,mangomint/create-react-app,viankakrisna/create-react-app,d3ce1t/create-react-app,timlogemann/create-react-app,timlogemann/create-react-app,IamJoseph/create-react-app,GreenGremlin/create-react-app,ConnectedHomes/create-react-web-app,mangomint/create-react-app,ConnectedHomes/create-react-web-app,d3ce1t/create-react-app,infernojs/create-inferno-app,ConnectedHomes/create-react-web-app,IamJoseph/create-react-app,viankakrisna/create-react-app,jdcrensh/create-react-app,ConnectedHomes/create-react-web-app,d3ce1t/create-react-app,facebookincubator/create-react-app,mangomint/create-react-app,facebookincubator/create-react-app,Timer/create-react-app,Timer/create-react-app,d3ce1t/create-react-app,GreenGremlin/create-react-app