Fixed bugs in manage_keypairs so that it now works with Openstack.