CXX-158 use L_tmpnam and touchup some comments