fix logic in agent.lua regarding to config.

so that only one of the three options can be used. This commit fixes the
failed "clearer logic" in #526.
Merge pull request #530 from virgo-agent-toolkit/songgao/fix_logic_for_config

fix logic in agent.lua regarding to config.