Fixed most memory leak and big-endian bug in the spoolss code.