GpDirsExist check for directories only
GpDirsExist check for directories only

gpdeletesystem uses GpDirsExist() to check if dump directories are
present to warn and avoid deleting the cluster. Only if "-f" option is
used allowed to delete the cluster with dump directories
present. Though this function incorrectly checks for files and
directories with name "*dump*" and not just directories.

So, gpdeletesystem started failing after commit eb036ac1. FTS writes
file with name of file as `gpsegconfig_dump`. GpDirsExist()
incorrectly reports this as backup directory present and fails. Fix
the same by only checking for directories and not files.

Fixes https://github.com/greenplum-db/gpdb/issues/8442
Reviewed-by: Asim R P <24f343109504afa210657d296a0873118cbd2b97@pivotal.io>

greenplum-db/gpdb,jmcatamney/gpdb,adam8157/gpdb,jmcatamney/gpdb,adam8157/gpdb,lisakowen/gpdb,ashwinstar/gpdb,adam8157/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,50wu/gpdb,lisakowen/gpdb,jmcatamney/gpdb,lisakowen/gpdb,ashwinstar/gpdb,lisakowen/gpdb,lisakowen/gpdb,xinzweb/gpdb,xinzweb/gpdb,lisakowen/gpdb,xinzweb/gpdb,ashwinstar/gpdb,lisakowen/gpdb,50wu/gpdb,lisakowen/gpdb,50wu/gpdb,jmcatamney/gpdb,adam8157/gpdb,jmcatamney/gpdb,adam8157/gpdb,xinzweb/gpdb,jmcatamney/gpdb,50wu/gpdb,50wu/gpdb,adam8157/gpdb,50wu/gpdb,adam8157/gpdb,jmcatamney/gpdb,50wu/gpdb,xinzweb/gpdb,greenplum-db/gpdb,xinzweb/gpdb,greenplum-db/gpdb,adam8157/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,50wu/gpdb,greenplum-db/gpdb,greenplum-db/gpdb,xinzweb/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,greenplum-db/gpdb