2

You can replace the pair И followed by an accent with the precomposed Í so long as you make sure that you search/replace for the longer string before the shorter one.
I just added two more gsub replacements to the file:
function cyrtr (s)
return
string.gsub(
string.gsub(
string.gsub(
string.g...