Astrometric detection of binary companions and planets: Acceleration of proper motion