Switched writer and muxer to pointers

The main advantage of this is that the file won't get created until we
actually start to write something. So if you're doing 2-pass and cancel
during the first pass, there won't actually be a file. I prefer using
simple scope to this new/delete method, but it seems like the logical
thing to do.