use full path, not basename, when constructing relative paths