Minor fixes

 * StringBuffer to StringBuilder
 * SqlHelper use simple calls to String.print
 * Added SqlHelperTest to test the changes