Fix #4426

This adds a general wrapper to catch uncaught exceptions in master
processes that could cause master worker procs to die and for bad
returns to not make it to the minion