The packager have now its own functions library

It's cleaner and we can now detect any error during the process, and cleaning the "/tmp" folder at the end.