Handle error when file tokenization fails

If the script is run on a file that causes a token parsing
error, it will exit with a Python backtrace.

Catch the TokenError and print an error message to stderr.

Change-Id: I4ba3b0f7d095d3c03bb824fa64fd5d10a2a41e93