App delete function now deletes associated permissions. (apps module)