Fix template path with different cwd.