Fixes #3747 - Move on the begining of the script the initialization of variables which determine if CFEngine promises already exist

Fixes #3747 - Move on the begining of the script the initialization of variables which determine if CFEngine promises already exist