We currently exit successfully on a failed fsck, but we should instead
exit 1 so that users can tell that there's been a problem. This also
means that users can easily use git lfs fsck in CI to check for invalid
pointers in their commits and have CI fail if there are.
Add some tests for our new functionality as well.
Reorder the existing code to reduce the need for an additional if
statement.