Implemented csv encoding of tracks

This closes #179