Improved OPL output

Used snprintf and string concatenation instead of iostreams plus better
buffering, which makes it much faster. Slightly changed format.