Make std.file.setTimes safe