A method for trapping muons in magnetic fields, and its application to a redetermination of the EDM of the muon