conditionally replace ? characters in filename