fixed bug where resource would not add entry to hostfile

...when a similar hostname was present (i.e. would not add foo.com if www.foo.com was present)