Rails upgrade

Upgrades to Rails 4.1.8 and some improvements for the deploy script