Germany edged France to book a FIFA World Cup semi-final against Brazil, with Mats Hummels heading home the only goal early on.