CSV download fixes

I think this should fix the issues raised in https://github.com/wp-e-commerce/WP-e-Commerce/issues/241