Ensure directory exists in local adapter createStream method