fixed exception on broken links

Uses os.path.exists before checking filesize.