Fix possibility of non-removed symlinked directory.
https://github.com/yiisoft/yii2/pull/4091#discussion_r14296860