Changed GNU sed and wget commands to BSD sed and curl equivalents, respectively.