Add a test for the exit callback stuff.
Merge pull request #113 from unknownbrackets/callbacks

Add a test for the exit callback stuff