more flexible 'index' option for directory handler