Separated code checkout to a module.

This will make sure the right version of the code will be shipped in the gem
and the right version will be used when compiling directly from git.
Add version require to checkout module.