Add proper escaping for input/output filenames