US inflation increased less than expected in August and price pressures were more moderate in the prior month than previously reported, data suggests.