IS_FOLDER Determine if path is a folder

for Matlab < R2017b that doesn't have isfolder(), note that exist() also looks on the Matlab path.