In a number of scenarios (including in PipeScript's .psm1), it is important to get the exports of a given module. The code to do this can change slightly depending on if the module has already been loaded or not.