Detect capitalisation of PATH variable in the environment.

Copied similar detection code from deps/npm/lib/utils/lifecycle.js
into npm's test/run.js to seek whether it is PATH, Path etc..
before changing it.

Fixes #7