A lung probe that diagnoses bacterial infections could prevent unnecessary use of antibiotics in intensive care units, researchers believe.