VID-1841 Make sure cat names use underscores

Yea, I thought about that while writing this. My only hesitation is that it's not quite as explicit when reading it. Seeing that $categories is passed into and then reassigned from transformCatNames() makes it more obvious (to me at least) that it's just being changed. You have to go into the function definition to actually confirm that otherwise. Since $categories shouldn't grow to much more than an array of 10 strings, I think the slight clarity for the reader outweighs extra savings in memory and speed in this case.