Stripping Illegal Characters from XML in Python