use long hostname if no hostname given
Merge pull request #231 from tsloughter/master

use long hostname if no hostname given