Adapted to changes to kernel interface (how database name and temp directory path is configured).