Parameterized db path in core

Re-wrote core so that it returns a function instead of an object and
that function takes in a dbPath as parameter. This parameter sets the
location of the database relative to the execution directory.

This required updates to the seed and test files so that they are
compatible with the way core is brought up now.