Fix bug when registering public key to a site which has no ~/.ssh folder.