Compute the hash of a directory for later comparison