Restore BSD conditional fix

This change was bundled with another, and was subsequently lost when
permissions changes commit was reverted. See
https://github.com/cfengine/core/pull/1593
Permissions changes for FreeBSD/Solaris

The initial commit was reverted (see
https://github.com/cfengine/core/pull/1593 for background). Instead of
changing permissions for all nix systems then, differentiate between
(FreeBSD|Solaris) and others. This bloats up the tests, but hey.
Merge pull request #1606 from aappilattoq/master

Special bit permissions: take two ; restore BSD conditional fix
Various files were missing from the make dist tarball. Also fixed some whitespace issues.
Merge pull request #1609 from jimis/proper_tarball

Various files were missing from the make dist tarball.
RM #5325 add test for duplicate bundle calls.
Do not treat promiser as regex in insert_lines promises

Close #5270
Redmine#5270: simplify test
Use SaveAsFile for Mustache templates

Close #5292
Optimize, more precompiled regex