Fix for acceptance tests.

It turns out that using printf and stat is not such a good idea, since
their behavior change from platform to platform.
This commit changes the mode test to a little perl script.
Merge github.com:cfengine/core
Splitting of cf-key

Functionality is moved to libpromises to make it easier for testing.
Only main and getopts will remain in cf-key.c
I added the skeleton of a test unit so we can start populating it
with real tests :-)
Merge pull request #408 from cduclos/cf-key-split

Cf key split