Fixes #2941 -- don't destroy extensionless filenames for --join