Added and fixed several pgdb build scripts

Cleaned up, improved, and added build scripts