Launch REPL with an optional command line switch

Added main.c where int main has been defined to read the command line
switches, and launch the repl (now implemented in a separate non-main
function) if the --repl switch is passed via the command line.