Correction - Handles trailing empty line at connectedInterfaces

This updated proposed patch was tested with more than 1 active interface
Merge pull request #2 from alexisdacquay/master

Correction - Handles trailing empty line at connectedInterfaces