Updated build_osx to build correctly under "build" directory.

Updated pmbuild files to have correct permissions and build correctly under "build" directory.