(PUP-3190) Improve readability of function creation logic.
(PUP-3190) Change acceptance test to use directory environment

This changes the fun4x_loadable_from_modules acceptance test
from using the deprecated modulepath to using a directory environment.