Some fixes and new features

Hi Duane!

I made some fixes and new features for dnscap. If you want to merge them, I could delete my dnscap fork (there are already enough dnscap forks on github)