Bugfix for lost import in discovery.py

https://bugs.launchpad.net/rubick/+bug/1252661
Add lost dependency 'stat' in discovery.py