Why are you not using wp_list_categories() to produce the list? It adds current-cat and current-cat-parent to categories, for the is_category cats, and supports a current_category input parameter for your own use if you want individual posts to trigger the current-cat class as well.