Fix find_bytes and disable hanging unit tests.

This is my alternate proposal to pull #39. This includes the basic fix that pull request, and disabled the tests which hang under valgrind because of the unchecked early return. I set Shayan as the author of the first patch so he got proper credit in the history.

I'd rather not do this, but I think it's more productive at this point to get the better code landed. Of course we should re-enable the tests as soon as the hangs are fixed.

@ShayanZafar, @caitp, what do you think?