Treat the case of an empty servername.
Replace running unit-get with charmhelper's unit_get.
Another place where servername was used.
Better to catch the config_get call and replace servername there when needed.
Cover more cases
[ahasenack] If the config key "servername" is empty, fill it in with the public-address of the unit to match what the documentation says.