Avoid .writeheader() because it isn't available in Python 2.6.