Fix up tests.
Upgrade rails.
Merge pull request #30 from square/rails-upgrade

Rails upgrade
Adjustments to kochiku-build.sh.sample

* more dependable method for getting the current branch
* simpler method for getting remote url. Assumes remote name is origin.

R: @cheister
Merge remote-tracking branch 'upstream/master'