When retrieving file contents for diffing we need to get the contents as binary. Otherwise python3 will try to convert the file to text and fail with non-decodable contents. Fixes #23171