added directory_id to resources as well as has_many belongs_to relatinship between directories and resources