ScriptRunner: Ignore empty lines in scripts
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.
README.rst: Add example for record&replay of tty devices