This reverts commit d054e313. os.path.join is *not* suitable for concatenating parts of the basename of a file. Closes: #11526
mentioned in issue #11527