Ruby re-write of Perl LibXML PrettyPrint