Ireland have survived a major scare by holding off a spirited Argentina side to post an unconvincing 22-19 victory over the Pumas in Dublin.