$\pi$ junction behavior and Andreev bound states in Kondo quantum dots with superconducting leads