remove trailing whitespace on target (from tab completion)