Properly dispose of XmlWriter objects

This commit fixes an issue where the complete XML output would not be written before the program exited.
Changed database table output to include command text.
Added assemblies required by the previous commit.
Merge pull request #4 from ascire/master

Include Database Commands in XML, Dispose XmlWriters
Fix database / tables in subreports; accept second argument for output filename