Only start the identity-file-writer if managing state.
Merge pull request #1225 from howbazaar/1.21-identity-writer-fix

Only start the identity-file-writer if managing state.

Same fix as in master.

(Review request: http://reviews.vapour.ws/r/535/)