Fix bug require('checkdns') and add test