Fix test script mode.
Add coveralls configuration.
Change branch to master in Coveralls badge URL.
Add function to override system exception hook.