Wales edged past France 14-13 in Cardiff, where wing Liam Williams got on the scoresheet in the opening minutes for the hosts. 