Switch install_agent script to use the gem method