Make setData safer.

Made ProjectTreeModelr::setData much safer in case of an IO error or project tree item error.