getpart.pm: Strip carriage returns to fix Windows support