fix bug which prevents copying public key if curren directory is not $HOME