script recording: Support opening device multiple times
script recording: Support opening device multiple times

Append to an existing record instead of overwriting it. Ensure that we do not
start writing at the end of the last line.

martinpitt/umockdev,martinpitt/umockdev,martinpitt/umockdev