Do not clobber the previously written content of a log file.

In the "patch" task execute() is called many times, so log should be
written in append mode.
Use patch(1) or git(1), whichever is available.