shell: adds changing host name rule

Adds rule when changing host name to allow the user to be able to use
periods in between characters but not consecutive ones since empty
subdomains are invalid. Also changes the error message appropriately.

Fixes #1132