Bugfix for handling directory symlinks