Extract common code and attempt to fix sbt command line test failure
Improve test cleanup