Patch Set 5: Looks good to me, approved; IP review completed

- rebased and resolved conflict
- the new test testInitNonEmptyRepository() which came in through rebase failed since it expected the behavior of the previous implementation of createTempDirectory() which ensured that the directory will be created using mkdirs. Fixed this
- fixed whitespace errors