Fix regexp to support ruby 1.8
Add rake as development dependency
Improve logging