Use tmp file for database test.

The file for database test is located in the tmp folder of the os and deleted after test completed.