File upload

Same as last file upload with tests, except that dependency on saving the file has been removed; direct processing of tempfile in helper method.