Added insert_entry and search_entry in directory.js.