Electromagnetic effects on the light pseudoscalar mesons and determination of $m_u/m_d$