Hi CSpace and welcome,
Yes, you are right. You need to tack on the header information. We have various code that does this lying around the InfoPath "shop floor". The trick is finding someone and allocating time to get the code and package it off to you. :) I'm guessing that would take about 30 minutes or so to do and I'd have to pay the person to do it. ;) Life is not free, but this InfoPath forum sure is, so what on Earth am I suggesting to you ... :S
OK, I know that our forum search is hard to use ... so, Ernesto came up with a handy dandy Google search link: http://www.google.com/coop/cse?cx=003654972516704994317:4j0mji2l1rq
Go there and type in "mso inline base64" (without the double quotes) and click search. You should get two documents. Not sure that either of these will reveal the solution, but if they do, please reply here so that others can leverage your enlightenment.
If after all of these travails, if you still have no grand scheme, feel free to just PayPal us your hourly rate times 0.5 (30 minutes) and we will send you some "packaged" stuff. Sorry for the money grab, but if we spent all of our time helping people in the forum, we'd surely go out of business and no longer be able to help anyone... Here's a PayPal link... https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5038435.