Update gem:create task for Rubygems 2.x.
Moved FFI functions to their own file.