Add support for non-primary email addresses.

Previously there was an exception when no primary email address was returned from Bitbucket.