flux-module: fix segfault loading out of tree mod

flux-module would segfault in some cases when searching the module
path, if the glob matched a file that could not be dlopened or which
was not a module.
Merge pull request #32 from garlick/flux-module-segfault

flux-module: fix segfault loading out of tree mod