Catch silent errors.

When an exception is thrown inside a promise, it *should* be caught by the
promise.done() method.  But occasionally it is not, and the program
ends silently with a 0 exit code.  That's not good -- explicitly catch
thrown exceptions at the end and ensure a non-zero exit status.

Also use the promise monitor built in to the 'when' package to catch
any other lingering unresolved promises.

Change-Id: Iefd05cf82aee12913a1776e36361e48710d2c755