Improved methods to obtain IP address and Interface being used

Iv'e improved the method to obtain the IP address and Interface being used.

The reason for this is because I was unable to use this script when using an interface other than "eth0". This should also make it future proof and compatible with other systems not using UDEV to assign interface names (such as Arch, Fedora etc)