Made ncurses_getline() only accept 'regular' input

Made ncurses_getline() only allow regular characters, numbers, symbols, and spaces. (In other words, disallowed the symbols that would appear by pressing CTRL-[key] or by resizing the window.) Also fixed an embarassing memory leak in main.