rake build.  fixes issue #11
add basic test from gist
merge with trunk