Allow user specified output filename

Also fix some attributes on the generated code to keep Gendarme/FXCop
happy.