Doing a directory check before attempting to map a directory (prevents logs filling up)