Address issue #81 - Unsafe threaded use of ctime()

Replace use of ctime() with ctime_r()