build.sh: V1 of PSD build script

It needs some bells and whistles, but it's ready to use.