Close windows and views during tests.

Set them as scratch in most cases to avoid waiting for user input.
Something odd is going on with the file watching
during save commands that causes a panic, hence
the commented out view and window close calls.