I will look at the code and see how it is used. I thought it was directly passed to open but now I see that the with-... macro is not a standard one. What about merging in a way that does not pass the extensions? What about
(merge-pathnames ,relative-path (make-pathname :name nil :type nil *this-file*))
instead of
(merge-pathnames ,relative-path *this-file*)
Juanjo