DNS works in terminal but not elsewhere in Mac OS
Why does it work in Terminal and why doesn't it work in Mac OS? The answer to your first part is in man dig or man host:


  The dig command does not use the host name and address resolution or the DNS query routing mechanisms used by other processes running on Mac OS X.  The results of name or address queries printed by dig may differ from those found by other processes that use the Mac OS X native name and address resolution mechanisms.  The results of DNS queries may also differ from queries that use the Mac OS X DNS routing library.


To answer the second part, I would run a packet trace and see if the query packets are going out, and if so, to where? tcpdump -i en0 -vnnt "udp port 53"

mDNS is for Bonjour discovery; I don't believe it has much to do with standard DNS but don't quote me on that.