A measurement of the lifetime of the tau lepton