Encode api_key as UTF-8 before passing to HMAC library

The HMAC library only knows how to handle encoded strings (it can't handle unicode) - I think because it is using string.translate internally.  So this change will explicitly encode the api key before sending it to HMAC to be signed.