Pion production in proton collisions with light nuclei: implications for atmospheric neutrinos