Added tidy option

I've added an optional --tidy option to indent and format the flattened XML file