faster IO not using csvwriter module

So, this is an implementation of a CSV writer module that might be faster than the one in default Python (does less things). It basically builds up a file in memory and then dumps it to a file. The creation process ought to be faster and memory efficient, although if the output file is very large, it could eat up a lot of RAM, but you have the data in memory anyway, and throwing some numbers in shows reasonable memory usage in practice. Try it and see whether it works. Also, feel free to change the formatter. I used %18.6G, but %g or %f might well be enough.