Avoid compiler warnings when printing off_t type.

Cast off_t to maximum signed integer type and use the 'j' length
modifier for intmax_t. Also assert that offset is not less than 0.

See C99 standard (N1124) 7.19.6.1 - fprintf 'j' length modifier.

See C99 standard (N1124) 7.18.1.5 - Greatest-width integer types.
To paraphrase the standard, intmax_t is a signed integer type which can
represent any value of any signed integer type.