tests/remote: Use a function to add a log file to a remote host