mem_arena: Replace insecure temporary file creation with devshm, importing Dolphin’s code.