Fix non-NULL terminated separators to strtok()

which was causing occaisional problems processing files
with MSVC