Quasiconvexity and relatively hyperbolic groups that split