Computing Through Singularities in Potential Flow with Applications to Electrohydrodynamic Problems