JBTM-1650 SIGPIPE as xatmi test tearDown() is calling tpdiscon()

Created a new pull request to do the rebase while amos is away. This (at least starts life) as the same as pull #43