Fixes #414 - integrates rubocop gem

Adds rubocop gem and fixes majority of issues noted by cop.
Hm, wonder why rubocop didn't pick this up. Does it not check haml?