ATTRIBUTE_FORMAT_ARG is now used

The gettext() wrapper function needs to be markable as:
  __attribute__((format_arg(1)))
but since not all compilers accept it, we wrap it.

Also, a new template for handling perl program options is added.