Nanometre-scale chemical modification using a scanning tunnelling microscope