Added git status and branch checks to publishing script