escape ' properly, fixes #27 #29