fix: if a path is symlink and trying to chmod, OSError Exception will be raised.
Merge pull request #3638 from shirou/devel

fix: if a path is symlink and trying to chmod, OSError Exception will be raised