Added get ip address function. Imports os module.