Fix improper cleanup of /etc/hosts + test