France qualified for the World Cup 2018 knockout stages with Kylian Mbappe's strike the difference in a narrow win over Peru.