Fix 'weird error'.

Whenever npm gets an error code that is numeric, it outputs
'weird error' - including practically every instance of running
'npm test'.

This change outputs 'exit code' for numeric errors and 'weird error'
for the remaining cases.

Related: #3918