Added character escaping on anchor IDs

Prevents script from breaking if first character in an anchor ID is a
number.