FC-2847 fix duplicateFile() in image formtool