Avoid confusion by using a different name for the namespace and the directory
Uses NODE_ENV rather than WIRES as environment specifier. Unit test added.