Added pg gem for Heroku

Heroku doesn't handle sqlite3, so the code needed to be altered to give
that gem a condition and add the pg gem.