Fix formatting integers with both precision and the sign flag set

Format strings such as "%+.2d" were not properly padded with zero.