added some more index sanity checks. added const qualifier where necessary
drwxr-xr-x - bin
drwxr-xr-x - doc
drwxr-xr-x - examples
drwxr-xr-x - src