The `hostname` command does not require root to execute
This commit does a few things: 1. Make the hostname update idempotent with `grep -w` 2. Add the given hostname to `/etc/hosts` as recommended by the docs 3. Add missing tests