$L^2$ estimates for averaging operators along curves with two-sided $k$-fold singularities