Added basic error checking to calculator.lua

-Check to make sure first and second arguments are actually numbers
-Moved helper functions to be above main function