Add a build and publish Rakefile
Fix a bug in the Rakefile