Make rake db tasks work properly with sqlite when run not from the Rails root path.

The easiest way to encounter the problem is to create a fresh new engine and then run:

    rake db:create
    rake db:structure:dump
    Error: unable to open database "db/development.sqlite3": unable to open database file

So I fixed this for structure:dump, structure:load, and test:purge tasks in the same manner as it's already done in the drop_database method. The bug is the same in the rails 4. So I can make another pull request to fix it there.