Fixing a bug with python versions after 2.7.5 that seem to have trouble with newline characters in the token