workaround build failure when output file is read-only

The problem was observed with IntelliJ IDEA and Perforce, but I
assume other archaic SCMs like ClearCase are also affected. When
IDEA is configured to copy resources to project output directory,
it apparently preserves file attributes, and with Perforce this
means output directory will contain read-only files.

The workaround is to set writtable flag on all output files

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>