fix bug: index filename creation if dir with subdir