refactoring `duplicate_submission` and using the tempfile library to handle temp files
refactoring `duplicate_submission` and using the tempfile library to handle temp files

kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi