Add tasks and script to clean up temporary files created by magic processing. Update magictool to add modes to control this cleanup.