rebase-theirs: replace deprecated tempfile for mktemp. Closes #8
rebase-theirs: delete all tempfiles, not just the last one
rebase-theirs: avoid intermediate non-0 status when testing flags