Scotland sneak past Samoa at the death