Fix Rakefile to work for tests