modified buildAndPublish script to fix permissions after build