Bug Fix: Deal with idn_to_ascii's inability to handle some strings (issue 409)

Based on fix suggested by Mahesh Patade