[BUGFIX] Only write temp asset files when content changes

Instead of always overwriting asset files in typo3temp/, this
is now only done when the content of the file changed.

This keeps the modification timestamp stable, so that browsers can
keep using the cached version of the file even when
versionNumberInFilename is activated in TYPO3.