incorporating meskyanichi's suggested changes into Nagios notifier