Mayo have to dig deep to get past Westmeath and book quarter-final against Tyrone