Add option to excape illegal chars

If PyToXml is called with escape_illegal_chars=True then the string
builder will catch a ValueError and replace with ?
Test the cases