Create a function that generates a JSON index of files with content hash and relative path. Used to detect changes between backups.