Throw error for inexistent dir
return empty array when .gitmodules is missing