Blob#batch can't handle frozen string paths

This happened on staging because we are mixing some Gitaly paths with some Rugged calls:

[ stg ] production> Feature.enabled?(:gitaly_raw_changes_between)
=> true
[ stg ] production> Feature.enabled?(:gitaly_list_blobs_by_sha_path)
=> false

https://sentry.gitlap.com/gitlab/staginggitlabcom/issues/197315/

RuntimeError: can't modify frozen String
  gitlab/git/blob.rb:112:in `[]='
    path[%r{^/*}] = ''
  gitlab/git/blob.rb:112:in `find_entry_by_path'
    path[%r{^/*}] = ''
  gitlab/git/blob.rb:191:in `find_by_rugged'
    blob_entry = find_entry_by_path(repository, root_tree.oid, path)
  gitlab/git/blob.rb:59:in `block (2 levels) in batch'
    find_by_rugged(repository, sha, path, limit: blob_size_limit)
  gitlab/git/blob.rb:58:in `map'
    blob_references.map do |sha, path|
...
(144 additional frame(s) were not displayed)

RuntimeError: can't modify frozen String
Edited by Stan Hu