Pass params necessary to upload key pairs.

The original implementation did not pass the required attributes to upload
an existing key pair up to the API. This commit addresses that problem
while maintaining backwards compatibility. The 2nd argument was changed
from a string to a hash, a deprecation warning is generated.