Made exit function successfully unbind itself

Gave the function which calls exitFunction in test scripts a name so that we can successfully no longer listen to the 'exit' event and avoid getting 'done() called twice' errors.