Set print and xpcall to locals in main.c's lua code

This prevents any undesired behaviour from those functions being set to
something else, such as lua errors not being printed to the console if
the global print() function was changed.