Check things on sectors more accurately

Quite a bit of code was taken from WinMBF for this. This _finally_ fixes
issue #9!