Fix signed/unsigned warning in numeric shift

The lshift and rshift functions are both wrapped with code that test if width is negative and any negative value is changed to positive and the l/rshift call swapped.