fix(util): properly handle exceptions from onPrepare and onExit

p.s. the important bit is in `runFilenameOrFn_` in `util.js`
What if filenameOrFn is a filename, and it doesn't export a function? Would this just silently do nothing?