Exit test script with proper status