Updated to_xml_file() to use to_xml() and added support for file-like objects. Closes #60
Fixed indentation