Fix template test to use dynamic root path