Setup rubocop.

Closes #702.