[Bug 10249] Restore.pl bugs on Postgresql restore failed on DB

Added part of cod for set password via environment variable

I added code like Martin and Rodney Yeo Chuan Lye suggested.
Thanks for help

Regards
Zoran