Jordan Ayew converted a penalty for Leicester City after Bristol City's Scott Twine tripped Stephy Mavididi.