Rewrite file to reduce concurrency issues and more closely match php version

Does all combining and compressing in memory, then writes to disk if
required. Data is served from memory, not disk. Include a number of
fixes from php version including Norton Antivirus detection, and max
cache size. Includes additional fixes such as correct UTC time, and
sorting script files to reduce possible hash keys on equivalent data.