postgres.cc: Check g_rename() return values.

Found by Coverity Scan.