check_disk: no longer hangs on hanging filesystems

Just turning attached patch of github issue #867 into a push request.