fix get_private_keys for edge cases

- returns nil if it finds nothing
- handles skipping directories that don't exist
- deterministically handles both "keyfile" and "keyfile.pem" in the same dir (hands back "keyfile" contents)