fix: use boost::shared_ptr for function argument

I was using auto_ptr to pass the out stream into DataFileWriter. That’s
the wrong way to do it because assignment of auto_ptr releases the old
one.