bugfix for new versions of "tm" package 

Avoid Error message  
" Warning in mclapply(unname(content(x)), termFreq, control) :
  all scheduled cores encountered errors in user code
Error in UseMethod("meta", x) :
  no applicable method for 'meta' applied to an object of class "character"
 "


The latest version of tm (0.60) made it so you can't use functions with tm_map that operate on simple character values any more. So the problem is your tolower step since that isn't an "canonical" transformation (See getTransformations()).
see: http://stackoverflow.com/a/24771621/202553
Merge pull request #5 from knbknb/knbknb

1-line bugfix for newer versions of "tm" package > v0.60