Refactored handling of NAMESPACE files

Added support for exportPattern directive (Issue #5)
[Issue #4] Fixes broken swing repl