Detect and warn if NPM version is in 1.x series.

Closes #2770
You aren't using the callback anywhere, so why not just define it inside the exec, would be easier to follow.