cscope db generation is refactored

function _cscope_build_db will generate cscope DB at given directory