Create dir before trying to generate ssh key

Signed-off-by: Michal Čihař <michal@cihar.com>
Share code for creating SSH dir

Signed-off-by: Michal Čihař <michal@cihar.com>