Added escaping of filenames