make templates work with absolute paths