fixed #395 - detect symlink