delay updateIndex post commit.

1) Update index post commit instead of pre-commit.
2)Add modification time when updating index.
3) Should also fix #2212 

@devoncarew