Make CSS aggregation work correctly

Be more careful about what gets cached in memory or on the file system
When rewriting CSS, the referenced asset should be made a dependency of the stylesheet asset