Backport sys.flavor test from Edward Welbourne

 * https://github.com/Webhuis/Cfengine-debian/issues/24