Check if StorageElement is valid in __removeReplica
Fix dirac-dms-clean-directory
FIX: test validity first in isValid()