add flexmock dependency.
avoid flexmock deprecation warnings.
avoid rake/rdoctask deprecation warning.
avoid rake/gempackagetask deprecation warning.
remove and ignore build files.
fix build on osx.

on darwin, libtool seems to build ruby extensions as .bundle (library) files,
rather than .so (shared library) files. i don't entirely understand the
difference, but this patch works around it.
Merge pull request #1 from adammck/master

Fix build on OSX