Get a short, unique key for a given file path based on the content of the file or its path.