Reduce the extra file changes, to improve the inotify performance.

These changes should finally ensure that a commit only occurs if there are modification in the working directory. Avoiding the extra file system modifications that seemed to be causing the performance problem for #77

(The problems that I had run into while working on this were related to my original code not properly accounting for repositories with no commits to start with. But the integration tests were starting with no commits in their repositories, which resulted in conflict results from the unit vs integration tests. This should be resolved and tested now.)

@quite if you are able to test this, it would be much appreciated.