Fixed 'isfolder' (should be 'isdir')