This really doesn't have anything to do with vectors, it is just the chain rule. The derivative of the absolute value of x is either -1 if x<0, or +1 if x>0. It can be "neatened up" into the following formula:
\(\displaystyle \frac{d}{dx}|x| = \frac{x}{|x|}\)
Now the result follows from simply using the chain rule.