(CFACT-91) Test for and filter trailing separators in PATH

Trailing separators in PATH would be concatenated with a relative path
in filesystem::path constructors, which would give a valid relative
path. This led to environment-dependent behavior, as relative paths are
not normally accepted by 'which'. Fix this by stripping trailing
separators and testing that we don't have empty path segments.
(CFACT-91) Fix external-dir with a relative path

Allow a relative path to be specified on --external-dir. We still
enforce internal APIs for external facts to use absolute paths. Fixes a
bug that allowed it to work depending on environment setup.
Merge pull request #159 from MikaelSmith/bug/master/CFACT-91-fix-external-dir-relative-path

(CFACT-91) Fix external dir relative path