Fix bug with mode and symlinks