Add auto-discovery script for the agent.

Refs #4865
Use sysconfdir for the agent certificate paths.

Refs #4865