fix writing media and constitutive relation files multiple times
Used some parts of Jörgs ogs6py (from the write_input() function) to first write the xml to a string, then remove the surplus medium tag and finally write it to a file. At some time we should really try to work on ogs allowing for multiple includes for on xml-element. Then this hassle wouldn't have been necessary.