Added a generator script for generating the module for popcorn

the script generates .erl files and rebar compiles them into a module
ready to be loaded as usual.