lib: fix user switching function
lib: fix user switching function

for now, we are implementing the guard manually, because of
ogham/rust-users#16. If that gets merged, we can go back to just using
switch_user_group.

coreos/update-ssh-keys,coreos/update-ssh-keys