fetch_CMIP5.py: fix file output headers and two bugs in parse_file function