A 26-year-old man presents with a 6-week history of productive cough, weight loss and night sweats. He is a recent immigrant from a high TB prevalence country. Chest X-ray shows right upper lobe cavitation. You suspect pulmonary tuberculosis. What is the most appropriate next step?