Added Blanchard-Kahn conditions check to the perturbation algorithm.