Hooks up rake test

Splits out class so testing won't create a task / can find the file with .rb extension
Renames test file so it's picked up by rake test
Moves Ruby logic to lib
Good to know!! I'm not overly familiar with writing gems and was concerned about somehow messing up the workflow! I'll test out and correct!