Added system-rules library to trap System.exit() calls inside JUnit
tests. This allows us to test methods that would otherwise break because
System.exit() is called inside the tests. Fixes bug NMS-1698.