Modular units and cuspidal divisor classes on X0(n2M) with n|24 and M squarefree