fix the errors when load() an non-existing index.
use IID_INDEX_DIRECTORY env var.

getopts does not work with plackup.