Added support for empty index files

If an index file is created with zero geometries then it cannot be reopened without an error.