Check for get_current_dir_name. There is a replacement function in
[tinc] / debian / dirs
1 etc/tinc
2 etc/tinc/example