message: IModelWrite test 'Run plain SQL against pull-only connection' now
  deletes the locally modified iModel at the end.
diff: @@ -2,10 +2,12 @@ import { expect, assert } from "chai";
  import { Id64, DbOpcode, DbResult } from "@bentley/bentleyjs-core";
  import { Code, IModelVersion, SubCategoryAppearance, IModel } from "@bentley/imodeljs-common";
  import { IModelTestUtils, TestUsers, Timer } from "../IModelTestUtils";
  +import { IModelJsFs } from "../../IModelJsFs";
  import { KeepBriefcase, IModelDb, OpenParams, Element, DictionaryModel, SpatialCategory, BriefcaseManager, SqliteStatement, SqliteValue, SqliteValueType } from "../../backend";
  import { ConcurrencyControl } from "../../ConcurrencyControl";
  import { TestIModelInfo, MockAccessToken, MockAssetUtil } from "../MockAssetUtil";
  import { AccessToken, CodeState, IModelRepository, Code as HubCode, IModelQuery, MultiCode, ConnectClient, IModelHubClient } from "@bentley/imodeljs-clients";
  +
  import * as TypeMoq from "typemoq";
  export async function createNewModelAndCategory(rwIModel: IModelDb, accessToken: AccessToken) {
  @@ -456,6 +458,7 @@ describe("IModelWriteTest", () => {
  it("Run plain SQL against pull-only connection", async () => {
  const iModel: IModelDb = await IModelDb.open(accessToken, testProjectId, testIModels[0].id, OpenParams.pullOnly());
  + try {
  iModel.withPreparedSqliteStatement("CREATE TABLE Test(Id INTEGER PRIMARY KEY, Name TEXT NOT NULL, Code INTEGER)", (stmt: SqliteStatement) => {
  assert.equal(stmt.step(), DbResult.BE_SQLITE_DONE);
  });
  @@ -513,7 +516,16 @@ describe("IModelWriteTest", () => {
  }
  assert.equal(stmt.step(), DbResult.BE_SQLITE_DONE);
  });
  - await iModel.close(accessToken);
  + } finally {
  + // delete the briefcase as the test modified it locally.
  + let briefcasePath: string | undefined;
  + if (!!iModel.briefcase)
  + briefcasePath = iModel.briefcase.pathname;
  +
  + await iModel.close(accessToken, KeepBriefcase.No);
  + if (!!briefcasePath && IModelJsFs.existsSync(briefcasePath))
  + IModelJsFs.unlinkSync(briefcasePath);
  + }
  });
  it("Run plain SQL against readonly connection", async () => {
  