Handle special characters like carriage return properly in file names.