The output would ideally just have the basename of the file and not a meaningless relative path. Fixes #2654