bugfixes + new functionality

* bugfixes - the usual, we were assuming that some variables are present where they might not be
* functionality - a CLI script to add a record in a zone. Helpful for scripting/bulk imports. It should be more flexible (I just added what I needed for a particular purpose), and when it is, it might be useful to be used in a rewritten import tool...