New test reliably predicts risk of preterm birth