The module_directory default contains $HOME which needs shell expansion at runtime. Single quotes prevented expansion, causing 'No such file or directory' when sourcing the lib script.