fixed symlink handling and dir perms