Fix race condition during counter file init. Bump version to 0.2.2.

There was a narrow window during the counter file initialization in
which the file existed, but the file was still 0 bytes and not 5 or 9 for
"0000\n" or "00000000\n". Close the window by making the initial
initialization steps idempotent (ftruncate, changing last byte to '\n')
and atomic (CAS-ing from 0x0 to "0000", if still 0x0).

(Found by @sw17ch; personal correspondence.)