Removes illegal characters from version names