Fix logfile generation if filenames contain + or space