Fix award_badges command to send emails.