Added function argument type and count checking for functions exported to Squirrel