x/ref: Update cmdline docs with usage pitfalls.

Also small changes to move code around to make things slightly
easier to understand.

Change-Id: I19cafd673adc050c7de97fa0a2fa992d31132d88
1 file changed