added parameter to control file extensions to check for in getExternalDependencies