mds/MDCache.cc: fix dereference null return value

Add assert to fix:

CID 716994 (#1 of 1): Dereference null return value (NULL_RETURNS)
  dereference: Dereferencing a pointer that might be null "dir" when
  calling "CDir::mark_dirty(version_t, LogSegment *)".

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>