Allow symlinks to also work for directories