VS problem. localtime_s appears to be OK.
VS problem. fopen_s(), vsnprintf_s().
Use #pragma to suppress _CRT_SECURE_NO_WARNINGS for VS2008.

This does work and does the least damage we can currently
get away with.
Correct comment as well.
Merge pull request #287 from arstrube/vs

Use of some MS _s() functions.