Convert to rake task

Closes #10