Atomically move known hosts file into place when edited by paramiko connections

Fixes #8169