Make the test use ScopedFile instead of creating/deleting manually.

Refs #7715