Refs #10223 Tidy up test workspace creation
Refs #10223 Resolve some static analysis warnings