Update tagging script.

Changes:

- Add pre|post tag merging
- Verify version and display warning when version does not end with (alpha|beta)
- Replace $1 in function with global variable for readability where applicable.