This patch fixes several problems in the tapex utility; accuracy of performance tests has been improved, the tapex exit status has been corrected and tapex was fixed to determine eom status in Command Timeout Test and exit with non-0 status to indicate failure.