This commit is a follow-up to 56774408 which does not take into account the case that the parent directory of the known_hosts file does not already exist.
56774408