Linux regripper

Changes have been tested successfully on win32 as well.