some enhancements for lib_search; new method isDir in Directory Helper; new method insert_id() in database class