dir.append(path_elements[i]);
if ( sgMkDir( dir.c_str(), mode) ) {
SG_LOG( SG_IO, SG_ALERT, "Error creating directory: " + dir.str() );
dir.append(path_elements[i]);
if ( sgMkDir( dir.c_str(), mode) ) {
SG_LOG( SG_IO, SG_ALERT, "Error creating directory: " + dir.str() );