smack: fix logic error in smackfs checking

If the stat(2) call returns -1, we shouldn't check buf at all due to the
error. If it returns 0, then proceed to verify that it is a directory.