Fix null byte error in filenames