Ensure hostnames are set properly. Fixes #712
Add tty and sudo options
Merge pull request #719 from mahendra/hostname

Ensure hostnames are set properly.