Extract private wrapper around writing index
Extract private wrapper around writing index

Whenever updating the rugged index, in order to keep things consistent,
it should be:
* reloaded before any action
* and written out immediately afterwards

To keep this consistent I have extracted this out into a private method
which takes a block and wraps the reload and write around them.

acant/git_simple,acant/git_simple