delay updateIndex post commit.

1) Update index post commit instead of pre-commit.
2)Add modification time when updating index.

@devoncarew