CLOUDIFY-1947 Refactor install_cosmo, and fix copy paste errors