Unit tests now use thier own temp db, formating fixes in test

- Unit tests create a temporary DB before each test
- Delete the temporary DB after each test
- fixes inconsistent formatting in tabs vs spaces in tests