Adding some tests and fixes to the kml output format (schema compliance mostly)