[#813] Fixed bug in pg_migrate.sh

Since we switch user the password env variable was not carried
though.