Add a bunch of fixes to RSH, CAT

I kind of just threw this together until Albert's DES code made it
through my tool.  I've got very little confidence this works, seeing
as how my shift test cases appear pretty useless, but I guess at least
it's something...