Improved test runner code to handle PHP-errors.