Measurement of the $\pi \rightarrow \mbox{e} \nu$ branching ratio