Make sure, .ssh directory and authorized_keys file are kept at correct permissions
Corrected log message
Moved defer f.Close() up so there is no chance of returning without closing and handled an error on f.Chmod
Merge pull request #352 from DerDackel/ssh-permissions

Ensure correct permissions on .ssh and authorized_keys file