Use deepcopy when writing task_database_entries in database to avoid modifying those default values when editing the database later.

This is vital as otherwise the dicts used for the root task gets altered which is a big issue  when dealing with drivers and threads.