Create directories for certificates

If non standard (say per service) directories are configured but don't exist
certificate generation will fail. This creates the directories before certs are
generated.