Diskcache: Fix a minor Bug.

 * Under some conditions we can write outside the buffer. Oops.