Handle expiries beyond the year 9999 by truncating them rather than blowing up

Fixes #28