script to test for broken links

also, fix the broken ones