improve builddoc script
fix broken links