Fixed bug in getClasses function

elem.classList returns an array of the classes and the split method threw a typeError.  elem.className returns a String that is properly tokenized with the split method.
Improved error message text