Added check for permissions before writing dc-rights