refactor AgaviUploadedFile, closes #1196