File output:
Added parameter for pretty print. Pass the file parameter directly to lxml.