Fix bug for ".local" host name

It's necessary to put new list member in squared brackets (i.e. create new list) to merge lists properly, otherwise we will get result list with character elements instead of string element.
Test for local domains (without dots) added
Merge pull request #878 from andrewshir/master

Fix bug for ".local" host name