Kac-Moody and Virasoro characters from the perturbative Chern-Simons path integral