Removed strcat dependency
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.