A measurement of the τ lepton lifetime