The new test may catch active tuberculosis in those with low access to health care or who have trouble making the phlegm needed for traditional tests.