Group Laws for Paths up to Homotopy