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
Why are these two table column names different? I thought we were keeping convention of any column that has foreign key is named the same as the one it's keyed to.