handle csv and space-delimited files when getting wordlist

icdar2013 training and test files have different formats, so add
try/except to handle it.

Also add a driver example for these functions in main