Fix missing expansion with a regular template

- Regular template with non-absolute target path is not expanded
- Add corresponding test