Fixed bugs, created support for moving the database file with environment variable TTRACK_DIR