Distribution: guess application directory from the OS (Win/Linux/MacOS)

Make DB directory a subdirectory of base directory.