Fixing bug in `strip` function.

The check string equality (==) in the tests was incorrect, and passing
even when the `strip` function failed. The tests now use `strncmp` and
the function has been corrected to pass all tests.