Correctly calculate the SHA1 value for a folder.