use different error messages for failure in opening an option file and opening a option directory

A same error message was used when opening an option file and opening an option
directory. So when an error occurred, it is difficult to distinguish what happens.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
use exists field for checking error in eStat invocation

When checking error in eStat invocation, its return value was cheched:
wheter it was NULL or not. This was wrong code. eStat always returns
something not NULL. Instead exists filed should be checked for the purpose.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
check file existence when expanding a directory name on search path list

When --options=foo is specified, foo.d is checked whether
it is a directory or not. If it is a directory, files under
the directory are loaded as config files.

For checking isDirectory function is used but is had a bug.
It was only isDirectory filed of return value of eStat.
exists was not checked. If exists is FALSE, the value
of isDirectory field is not meaningless.

With this patch isDirectory function checks exists field
before checking isDirectory field.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>