Fix /etc/hosts parsing

Empty lines in /etc/hosts cause an IndexError, this fixes that.