* Check the existence of the root path, and check whether it is a
 directory, before creating an index