Remove unnecessary newPath variable

`newPath` was created only to be `return`ed one line later, so I removed it.