Airlines are buying giant X-ray machines and other machinery to meet an Aug. 1 deadline to begin screening all cargo that goes on passenger planes.