Bash: Generate a hash of a directory