how can i check if a directory exists in a bash shell script