os.unlink?wtf?
i guess it was security inspired, but indeed, some things will be missed. i think it is based on the original code, that parsed and interpreted the output of modulecmd bash load.
at the very least change or remove the comment ;)