Fixing ssh_key issues with pull request 762

ssh_key_to_a should be calling definition.ssh_key since the variable ssh_key"
is not defined until lower in the loop. Also, in the loop we should be refering
to the variable from the array created by ssh_key_to_a when figuring out
a path.

I also noticed that if no ssh command was given, a nasty shellescape error was
given, so we should raise an error if that is the case.
Don't pass a command to ssh if command is nil
Merge pull request #995 from jordant/master

Fixing ssh_key issues with pull request 762