only open log.txt on processor 0

Only processor 0 will be writing into the file output/log.txt anyway, so
we only need to open it there. This might also fix some filesystem race
conditions.
Merge pull request #211 from tjhei/fix_log_txt_creation

merged