Fixed URL generation (stripping leading and trailing dashes). Dynamically add revision number to version in setup.py.