Fixed missing '"'s when writing url file.
pipes function now fails if a command fails.
curl needs -f to fail on failure (!?). May need -L as well.