Fix the guess_flavor logic and test with sshexec.