Fixing IP address sorting

http://stackoverflow.com/questions/6545023/how-to-sort-ip-addresses-stored-in-dictionary-in-python
Merge pull request #1 from xezpeleta/master

Fixing IP address sorting