Added 'space' as an acceptable string for the space key, in addition to ' '.
Changed tests to use INPUTFUNC to hold input()/raw_input() depending on Python version.