Added function to register all directives in Lua.

1. Rather than an ad-hoc system that was threating to evolve.