btrfs-progs: handle errors from test_isdir