Added pending wait for system shutdown

The system teardown method now does a pending wait on the system shutdown by calling the system specific isRunning method.

This pr resolves #10.