patch #503: check if homedir exists before trying to create ssh key