refactor AgaviUploadedFile, closes #1287