Why did you add ```&& newPath``` to the conditional?

I like that your PR includes styling changes to improve readability! Although, we are using jshint instead of jslint and throughout the project the conditionals (there are plenty of exceptions to this) are styled like:
```javascript
// single line
if (foo) bar();
// if/else
if (foo) {
    bar();
} else {
    this.bar();
}
```
Great PR! I especially appreciate the added tests.