Added an option to set the filename prepend

Repaired a previously broken unit test for escapeInvalidXmlChars
Added tests for the prepend.