Split functionality of Demux into a more general purpose demuxer and a tool that writes the data directory and TOC.