added tests for Image model, fixed upload path