Specs & refactor

Add specs for the functionality and refactor the long `Avatarly.generate_avatar` method.