Rory McIlroy was delighted to finish the second round of the Dubai Invitational will the lead despite carding a quadruple-bogey on the eighth hole.