Dollar gains on safe haven bid; sterling helped by CPI data