Logging for unhandled exceptions in and out of py.test

Also improved logging for test results