Redmine#1578: when creating logs, set mode to 600

Attempts to fix https://cfengine.com/dev/issues/1578, with acceptance test.