Made upload path dynamic to the root of the rails app.