Uncovering the Mechanism Behind the Improved Stability of 2D Organic-Inorganic Hybrid Perovskites.