Add check for no changes in the tree (no sub-modules)

Add the check at the early stage, otherwise populates the $CHANGELOG with empty lines.