2 small bug fixes

Hostname using linux prep needs to be hostname and domain not fqdn on both.

Checking the power state at that spot can cause ruby exceptions to be thrown.