Npm issue 6670 remove cwd

Here is a PR that addresses https://github.com/npm/npm/issues/6670.

Currently it is just a failing test, but the test shows my planned approach: if we encounter process.cwd() while traversing upwards, stop.

Will attempt a fix tomorrow.