Update build scripts for resilience and ease of use