instantiate an URL object if base_url is a string
extend Constant metaclass to all children classes at class init time

Otherwise `repr(CATEGORIES.AUDIO)` doesn't return the tree
representation until `repr(CATEGORIES)` is executed.
Merge branch 'master' into tests