Some cleanups from MIN and MAX to std::min and std::max
Convert survey, client_survey, and repair to new style commands.  Use the create bit when opening files so that first time works.  Remove extra mkdir for base directory that already exists.