add get_software_libdir function to modules.py, along with unit tests