EDX-643: Add unit tests for file upload