Improve script to setup labels

Address @gvwilson comments:

- add an example
- variables in the shell are UPPER_CASED
- Check that repository exists using a HEAD