Fix missing expansion with a regular template

- Regular template with non-absolute target path is not expanded
- Add corresponding test
Fix bug when target field has more than 2 elements