Tests update

Jakub pointed out that the scope change breaks mocking.  Solution is probably to add similar code so that the mocks happen out in the caller's scope, if that's how Pester is running.  For now, added failing test to ModuleScope.Tests.ps1.  (Later, we should probably split up the original test code so that only the ones that require access to implementation details are in one folder, and testing public functionality goes somewhere else.  Otherwise the ModuleScope.Tests.ps1 file will be duplicating a lot of stuff.)