I managed to fix the script. I'm still trying to figure how a simple little line gets changed when switching servers... Anyways, it appears to be working now, 14 sites were updated. Keep the updates coming in.