Fix a bug in getSHA1 and getCommitFile for WORKDIR and INDEX