Bug in same_directory/2
The predicate same_directory/2 relies on in_directory/2. This produces a trailing slash on path names, which hinders matching of the absolute path name of the parent directory.
Why do unit tests for in_directory/1 and same_directory/2 pass?