Fix readding \\n to manage len(ln) == 77

At 77 chars we end up with len(ln) == 2.  But the ln[-1] == ''.  And 'if
ln[-1]' evals to False so we don't add back the \n

Took an age to debug this. Hopefully it doesn't introduce some other issues.
Check if inputfile has name attribute prior to check if it is Android DTD
Add tests for &quot; escaping and unescaping
Add support for escaping and unescaping &quot; in DTD
Move comment and wrap it to comply with PEP8
Remove unnecessary condition
Add tests for quotefordtd()
Add tests for unquotefromdtd()
Add test for entity escaping in regular DTD
Add test for entity escaping roundtrip in regular DTD
Add roundtrip tests for regular DTD
Add and update copyright/license notices