Fixes for theme installation and the rails-post-deploy script

These are fixes for various problems @crowbot pointed out with
the `themes:install` and `rails-post-deploy`.