Fix guest detection to apply sudo alterations.

This commit checks for the name attribute of a guest introduced in
Vagrant 1.2 before falling back to the class name. Fixes #38.