You are correct! The HI protonated the alcohol, which converted it into a good leaving group. The iodide anion then attacked in a SN2 reaction.