[COOK-3617] Fix no method chomp on NilClass attribute errors

    The hostname/myhost/mydomain attributes try to chomp on a `nil` value, mainly the node["domain"] attribute. Additionally, || is used after a chomp, so empty string values will probably never hit the second half of the statement.

Signed-off-by: Seth Vargo <sethvargo@gmail.com>