Finish ruby 1.8.7 compatable
Exit properly from ctrl-c