fixed for loop syntax in the update-links script