Fix url_has_any_extension bug

Extension is the last element in the list split around '.',
thus the index should be -1 instead of 1.