I've modified some of this code to get it to compile on BSD, but
I have no confidence that the modified code will still run under Mach.
Some of the changes should be propogated back (namely, bool --> rvm_bool_t)
but I'm going to let Peter check in his Linux changes instead, which
may be cleaner.

(the tests are a mess to begin with, and will require a more concentrated
clean-up, I beleive, in order to feel confident about them in any sense.)
