Fix a bad refresh that would confuse the Importer.

Would assign the Id of the folder instead of the file. With this, the id
will be set properly again inside the local memory.
Enable to create the database elsewhere than the current dir.
Enable the importation to happen in a different directory.

Without having to change to the repository directory.