/*[^/]*/*$. If 
the result is empty it binds Directory to //.//a/b/ into /a/b. Volker 
Wysk pointed at this incorrect behaviour.
See also directory_file_path/3 
from library(filesex). The system ensures that for every 
valid Path using the Prolog (POSIX) directory separators, 
following is true on systems with a sound implementation of
same_file/2.156On 
some systems, Path and Path2 refer to the same 
entry in the file system, but same_file/2 
may fail. See also prolog_to_os_filename/2.
        ...,
        file_directory_name(FilePath, Dir),
        file_base_name(FilePath, File),
        directory_file_path(Dir, File, Path2),
        same_file(FilePath, Path2).