Added get_cookie()/set_cookie() functions, which write a node into the preferences file for storing persistent data.