Implement isfile, isdir, abspath, and getch.