Changed file extension to conform to HLS protocol.
Always flush buffer when appending media items.
Compute clip duration when recording.