fileutil: Fix -Wshadow warning with "index"

Reported-by: Pavel Šimerda <psimerda@redhat.com>