Use a file lock for known_hosts.

It might be preferable to create a known_hosts file in the deployment tempdir and add a flag to ssh invocations to use that, but this is easier for now.