Add quotes around CURL urls
Quote all curl urls

Add bash error checking.