IsFolder checks whether a given path is a folder or file. It returns "true" if the path is a folder and "false" if not.