added signed integer type SIndex to Index.h
added error handling for is_directory
use SIndex