Wales waited until the sixth last minute to beat France with a try from Ross Moriarty and clinch victory by one point, winning 20-19.