Hello and welcome to the forums! As no pros are around right now, I'll help you out!
First, the <eof> stands for end of file, and it is expecting that; which in turn means that any code after that line would not be run, which is causing problems. Usually this is because one or more too many "end"s. Deleting one usually solves the problem, but not always.
Second, when writing "else if" I assume you meant to write "elseif" (languages do differ in minor things like that, it'll catch anyone out!), and swapping the "else if"s for "elseif"s seems to have solved most of the problems. < That in turn means you'll have to remove some "end"s to avoid more <eof>s.
Third, I see that you can use shell.run(), you just forgot to in some places ;)/>
After that, it (during my testings) is fully functional! I'd recommend the next thing you learn is "os.pullEvent()" to do away with the read() functions, which would make this program look much better! For designing other programs it is also good to know tables, but this is a nice project!
I'm posting a (hopefully) bug free program, but I recommend you try to solve the above problems yourself ;)/>
Spoiler
http://pastebin.com/v2ytmzep Hello pros. am I allowed to help here? =DEdit: 1 minute late =P[