Syntax, other minor issues

Fixed some syntax and other issues so that this script now works properly using a zip input rather than a shapefile input.