fix bad substitution in document build script