Photoproduction of charged pions from 16O