Fix scripts to safeguard agent from spurious add/deletes

Signed-off-by: Anirban Chakraborty <abchak@juniper.net>
Merge pull request #5 from anirban-c/master

Fix scripts to safeguard agent from spurious add/deletes