Rake fixes

Fixes for the rake warnings and errors

/cc @philandstuff