[shared] fix CID 28548: remove unnecessary stat() call before unlink()
[shared] fix CID 28413
[shared] fix CID 28421