Various cleanups and refactorings

One key change is that we'll no longer pummel an existing authorized_keys file. We'll only add it if it doesn't exists or we'll append to it.