I downloaded a fresh 3.6.4 just now and it seems they changed the header of their files.
You have to change template_cache.php:99 (or download the new template_cache.php)
from
Code:
if (strpos(CVS_REVISION, 'template.php') OR $settings_changed)
to
Code:
if (strpos($_SERVER['SCRIPT_NAME'], 'template.php') OR $settings_changed)
This fixes the clearing of the templates/ folder when a template is edited/added.
I still can't reproduce the errors RS_Jelle is encountering.
Both include('template_cache.php') and require_once('./template_cache.php') work fine for me.