VersionControl Repository, exit cleanly if an exception occurred.

An exception within RunQueries would previously leave queryRunning = true