Add a sanity check in MemoryBuffer::getOpenFile() to make sure we don't hang