Merge pull request #4388 from giantlock/develop

fix pgpassfile removing
fix unit tests