Creates the reference object

Will allow to access to the reference databases stored in the DB.
Required for processing pipeline.
This PR also fixes a bug on test_setup.py. It was not testing anything, as now the cal to check_count does not raise anything. I had to fix anything related with this issue.
It changes the DB. The reference table now points to the filepath table to store the reference files
Can you ad the future imports?