Record and playback a terminal session