mergetool: add an option for writing to a temporary directory