Update mocha and mocha-phantomjs versions because of a 'process' issue. Use a different event type instead of switching order.