Run prepublish on tarball generation

Fixes #3854
Add exitCode property

As a polyfill to the node process.exitCode behavior - see
https://github.com/joyent/node/pull/6190
Return nonzero when ls returns no results.
fix broken tests

GitHub changed the url scheme for gists, this is fixing the
failing tests

Fixes #3897
Fix duplicate variable causing test failure.
Discover new versions with outdated

Add versions that are not matching the version specified in the
package.json as 'latest', at cost of one request more per package.

Show versions that are specified by the package.json as 'wanted'

Fixes #1428