fixes #4752 - fixed repository creation error due to improper puppet det...

...ection

also fixes double content environment add for candlepin versus adding and deleting
the appropriate ids