Mist: I think I figured out the problem.. a # character was right before the second replacement db query. I have fixed that in the file and it should install no problem now.
The hack code above is based on an un-hacked vB 2.2.6 install, but works wonderful with the
Sig and Avatars by Usergroup hack.
I just tested the updated code on a fresh install of vB 2.2.6 and it worked perfectly.